
local template = require("resty.template")
local mysql = require("lib.mysql")
local db = mysql:new()
local res, err, errno, sqlstate = db:query('select access_time,count(*) count  from     log_record  where access_time>NOW()-INTERVAL 1200 SECOND group by access_time  order by access_time asc ')
db:close()
if not res then
  res={}
  ngx.log(ngx.ERR,"select access_time,count(*): ", err, ": ", errcode, ": ", sqlstate, ".")
end
local context = {
  logList=res,

}

template.render("logLineReport.html", context)


